package com.freight.user.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.freight.core.base.FreightBaseService;
import com.freight.file.vo.PicFileVo;
import com.freight.user.dto.VehicleDetailInfoDto;
import com.freight.user.dto.VehicleLicenseDto;
import com.freight.user.entity.VehicleLicense;
import com.freight.user.vo.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 驾驶证接口
 *
 * @author huyingtai
 */
public interface VehicleLicenseService extends FreightBaseService<VehicleLicense, Long> {

    VehicleGpalInfoVo getVehicleGpalInfoVo(String gpsEquipment);

    List<HistoryVehicleVo> historyVehicle(String vehicleNum);

    JSONObject vehicleposition(String vehicleId);

    PlaterVehicleLicenseVo getPcDriverLicenseId(Long vehicleId);

    VehiceInfoVo getDriverLicenseId(Long vehicleId);


    void saveVehicleLicenseInfo(VehicleLicenseDto vehicleLicense);

    /**
     *
     * @param file
     * @param fileType
     * @return
     */
    PicFileVo uploadVehiclePic(MultipartFile file, String fileType)  ;

    /**
     *
     * @return
     */
    VehicleLicense getVehicleLicenseInfo(Long userId);

    void updateGpsEquipment(Long vehicldId,String gpsEquipment);

    String vehicleRegistStatus(Long vehicldId,Integer registState,String reason);

    void cancellationVehicle(Long vehicleId,Integer registStatus);

    Page<VehicleDetailInfoVo> vehicleManagementList(Page<VehicleDetailInfoVo> page, VehicleDetailInfoDto vehicleDetailInfoDto);

    Page<VehicleDetailInfoVo> companyVehicleManagementList(Page<VehicleDetailInfoVo> page, VehicleDetailInfoDto vehicleDetailInfoDto);

    List<VehicleInfoVo> getVehicleInfoByUserIds(Long[] vehicleIds);

    VehicleInfoVo getVehicleInfoByUserId(Long vehicleId);
}